﻿<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>班级管理系统</title>
    <link rel="stylesheet" href="~/css/index.css" />
    <link rel="stylesheet" href="~/iconfont/iconfont.css" />
    <script src="~/lib/jquery/dist/jquery.min.js"></script>
    <style>
        @@font-face {
font-family: 'iconfont';
src: url('./iconfont/iconfont.woff2?t=1677555468289') format('woff2'),
            url('./iconfont/iconfont.woff?t=1677555468289') format('woff'),
            url('./iconfont/iconfont.ttf?t=1677555468289') format('truetype');
}
.iconfont {
  font-family: "iconfont" !important;
  font-size: 16px;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
</style>
</head>
<body>
    <!--头部-->
    <header class="publicHeader">
        <h1 style="float:left; margin-top:20px">Class Management</h1>
        <!--时间-->
        <div class="publicHeaderR">
            <a><span>@ViewData["Greeting"]</span><span>@ViewData["UserName"]</span>, 欢迎你！</a><br>
            <a href="https://localhost:44332/">退出</a>
            <section class="publicTime">
                <span id="date">@DateTime.Now.ToString("yyyy/MM/dd")</span><br />
                <span id="time" style="white-space:pre">@DateTime.Now.ToString("hh:mm:ss")@ViewData["day"]</span>
            </section>
        </div>
    </header>
    <!--主体内容-->
    <div class="publicMian">
        <!--左侧菜单栏-->
        <div class="left" id="leftmenu">
            <h2 class="leftH2"><span class="span1"></span>功能列表 <span></span></h2>
            <ul class="list" >
                <li class="li1"><i class="iconfont icon-gerenweixuanzhong"></i><a href="/Manage/UserManage" style="text-decoration:none">个人信息</a></li>
                <li class="li1"><i class="iconfont icon-tianjia"></i><a href="/Manage/Create" style="text-decoration:none">创建班级</a></li>
                <li class="li1">
                    <i class="iconfont icon-xianxing-_fenjifenlei"></i><a href="userList.html" style="text-decoration:none">我的班级</a>
                </li>
                <li class="li1"><i class="iconfont icon-chengjiguanli2"></i><a href="userList.html" style="text-decoration:none">成绩管理</a></li>
                <li class="li1"><i class="iconfont icon-xueshengguanli1"></i><a href="/Manage/StudentManage" style="text-decoration:none">学生管理</a></li>
                <li class="li1" ><i class="iconfont icon-gerenweixuanzhong"></i><a href="userList.html" style="text-decoration:none">成绩管理</a></li>
            </ul>
        </div>
        <!--右侧内容-->
        <div class="right" id="rightcontent">
        </div>
    </div>
    <footer class="footer">
        <div style="text-align:center;">
            <p>China@2023</p>
        </div>
    </footer>
</body>
</html>
<script>
    setInterval(function () {
        //var currentTime = new Date();
        // var currentTime = DateTime.Now();
        const now = new Date();

        const year = now.getFullYear();
        const month = ('0' + (now.getMonth() + 1)).slice(-2);
        const day = ('0' + now.getDate()).slice(-2);
        const hours = ('0' + now.getHours()).slice(-2);
        const minutes = ('0' + now.getMinutes()).slice(-2);
        const seconds = ('0' + now.getSeconds()).slice(-2);
        var currentWeekday = new Date().toLocaleDateString('zh-CN', { weekday: 'long' });
        const date = year + '/' + month + '/' + day;
        const time = hours + ':' + minutes + ':' + seconds + ' ' + currentWeekday;
        // document.getElementById("time").innerHTML = currentTime.toLocaleTimeString();
        document.getElementById("date").innerHTML = date;
        document.getElementById("time").innerHTML = time;
    }, 1000);
    $('#leftmenu a').click(function (e) {
        e.preventDefault(); // 阻止默认的链接跳转行为
        var url = $(this).attr('href'); // 获取链接地址
        $.ajax({
            url: url, // 使用AJAX发送请求到该URL
            type: 'GET', // 使用GET方法请求
            success: function (result) {
                // 当请求成功后，将响应数据插入到页面中，比如插入到<div id="content"></div>中
                $('#rightcontent').html(result);
            }
        });
    });
</script>
